<%--
 * header.jsp
 *
 * Copyright (C) 2014 Universidad de Sevilla
 * 
 * The use of this project is hereby constrained to the conditions of the 
 * TDG Licence, a copy of which you may download from 
 * http://www.tdg-seville.info/License.html
 --%>

<%@page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>

<div>
	<img src="images/logo.png" alt="Acme-Bay Co., Inc." />
</div>

<div>
	<ul id="jMenu">
		<!-- Do not forget the "fNiv" class for the first level links !! -->
		<security:authorize access="hasRole('ADMINISTRATOR')">
			<li><a class="fNiv"><spring:message
						code="master.page.administrator" /></a></li>
			<li><a class="fNiv" href="dashboard/administrator/list.do"><spring:message
						code="master.page.dashboard" /></a></li>
		</security:authorize>

		<security:authorize access="hasRole('CUSTOMER')">
			<li><a class="fNiv"><spring:message
						code="master.page.customer" /></a>
				<ul>
					<li class="arrow"></li>
					<li><a href="availableItem/customer/list.do"><spring:message
								code="master.page.availableItem.list" /></a></li>
					<li><a href="availableItem/customer/listOnSale.do"><spring:message
								code="master.page.onSale.list" /></a></li>
					<li><a href="availableItem/customer/create.do"><spring:message
								code="master.page.item.create" /></a></li>
					<li><a href="availableItem/customer/listBestRating.do"><spring:message
								code="master.page.availableItem.bestRatinglist" /></a></li>
					<li><a href="purchasedItem/customer/list.do"><spring:message
								code="master.page.purchasedItem.list" /></a></li>
					<li><a href="purchasedItem/customer/buyerList.do"><spring:message
								code="master.page.purchasedItem.buyerList" /></a></li>

				</ul></li>

			<li><a class="fNiv"><spring:message code="master.page.order" /></a>
				<ul>
					<li class="arrow"></li>
					<li><a href="order/customer/list.do"><spring:message
								code="master.page.myOrders" /></a></li>
				</ul></li>
			<li><a class="fNiv" href="availableItem/customer/listCart.do"><spring:message
						code="master.page.cartList" /></a></li>

			<li><a class="fNiv" href="availableItem/customer/listWish.do"><spring:message
						code="master.page.wishList" /></a></li>
				
			<li><a class="fNiv"><spring:message
						code="master.page.comments" /></a>
				<ul>
					<li class="arrow"></li>
					<li><a href="comment/customer/list.do"><spring:message
								code="master.page.myComment" /></a></li>
				</ul></li>
			<li><a class="fNiv" href="comment/customer/myRating.do"><spring:message
						code="master.page.myRating" /></a></li>

		</security:authorize>

		<security:authorize access="isAnonymous()">
			<li><a class="fNiv" href="security/login.do"><spring:message
						code="master.page.login" /></a></li>
			<li><a class="fNiv" href="availableItem/list.do"><spring:message
						code="master.page.availableItems" /></a></li>
			<li><a class="fNiv"
				href="security/registration/registerCustomer.do"><spring:message
						code="master.page.registration" /></a></li>
		</security:authorize>

		<security:authorize access="isAuthenticated()">
			<li><a class="fNiv"> <spring:message
						code="master.page.profile" /> (<security:authentication
						property="principal.username" />)
			</a>
				<ul>
					<li class="arrow"></li>
					<li><a href="j_spring_security_logout"><spring:message
								code="master.page.logout" /> </a></li>
				</ul></li>
		</security:authorize>
	</ul>
</div>

<div>
	<a href="?language=en">en</a> | <a href="?language=es">es</a>
</div>

